package edu.sctu.xialei.june.day20150601one;

/**
 * Created by Administrator on 6/2/2015.
 */
public class Thread1 extends Thread{
    int k=0;
    public Thread1(String name, int k)
    {
        super(name);
        this.k = k;
    }
    public void run()                        //覆盖run方法的线程体
    {
        int i = k;
        System.out.println();
        System.out.print(getName()+":  ");
        while (i<50)
        {
            System.out.print(i+"  ");
            i+=2;
        }
        System.out.println(getName() +"  end!");
    }
//    public static void main (String args[])
//    {
//
//    }
}


